using System.Collections.Generic;
using UnityEngine;

namespace HuaXianQu.ProtoBuffEx.Runtime
{
    public class ProtoDebug
    {
        static List<string> m_logs = new List<string>();
        public static bool IsLogError() => m_logs.Count > 0;
        public static void Reset()
        {
            m_logs.Clear();
        }
        public static void Log(string message)
        {
            UnityEngine.Debug.Log(message);
        }
        public static void LogError(string message)
        {
            m_logs.Add(message);
            UnityEngine.Debug.LogError(message);
        }

        public static void LogWarning(string s)
        {
            UnityEngine.Debug.LogWarning(s);
        }
        public static string LogErrorMassege=>string.Join("\n",m_logs);
    }
}